#pragma once

//@author A0096950U
#include <string>
#include <sstream>
#include "Utilities.h"

using namespace std;

enum TaskStatus {
	TASK_ACTIVE,
	TASK_DONE,
	TASK_DELETED,
	TASK_ONGOING,
	TASK_OVERDUE
};

class Task {
private:
	static const string STRING_TASK_ACTIVE;
	static const string STRING_TASK_DONE;
	static const string STRING_TASK_DELETED;
	static const string STRING_TASK_ONGOING;
	static const string STRING_TASK_OVERDUE;

	TaskStatus status;
	string id;
	string description;
	string date;
	string time_start;
	string time_end;
	string tag;

	string taskStatusToString(TaskStatus);

public:
	Task(void);
	Task(string description,
		string date,
		string time_start = Utilities::STRING_EMPTY,
		string time_end = Utilities::STRING_EMPTY,
		string tag = Utilities::STRING_DEFAULT_TAG);

	// This method is for testing purposes only
	string toString();

	TaskStatus getStatus() const;
	string getID() const;
	string getDescription() const;
	string getDate() const;
	string getStartTime() const;
	string getEndTime() const;
	string getTag() const;

	void setStatus(TaskStatus);
	void setID(string);
};

